﻿<Window x:Class="Pvp.App.View.FailedStreamsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:app="clr-namespace:Pvp.App"
        xmlns:res="clr-namespace:Pvp.App.Resources"
        xmlns:util="clr-namespace:Pvp.App.Util"
        Title="{x:Static res:Resources.failedstreams_caption}" 
        Height="600" Width="600"
        DataContext="{x:Static app:ViewModelLocator.FailedStreamsViewModel}"
        ResizeMode="NoResize"
        util:WindowCustomizer.ShowIcon="False">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel>
            <TextBlock Text="{x:Static res:Resources.failedstreams_msg1}" TextWrapping="Wrap" Margin="5" />
            <TextBlock Text="{x:Static res:Resources.failedstreams_msg2}" TextWrapping="Wrap" Margin="5" />
        </StackPanel>
        
        <ListBox Grid.Row="1" ItemsSource="{Binding FailedStreams, Mode=OneWay}" Margin="5" HorizontalContentAlignment="Stretch">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Width="200" Text="{Binding Name}" />
                        <TextBlock Text="{Binding Value}" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <Button Grid.Row="2" IsDefault="True" IsCancel="True" Content="{x:Static res:Resources.ok}" 
                Command="{Binding OkCommand}" Margin="5,5,5,10" Padding="40,2,40,2" HorizontalAlignment="Center" />
    </Grid>
</Window>
